﻿#-*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
# Name:        tuple 元组
# Purpose:
#
# Author:      SUMMVING
#
# Created:     12/08/2013
# Copyright:   (c) SUMMVING 2013
# Licence:     GPLv3
#-------------------------------------------------------------------------------

t = ("summving",22,"male")
print (t[0])                #输出元组第1个元素，输出：summving
name,age,gender = t         #将元组里面的元素赋予name，age，gender(性别)
print 'age =',age           #此时输出：name = summving

a,b,c=1,2,3                 #字符赋值，等效于a = 1,b = 2,c = 3
print 'a =',a
a,b,c=(1,2,3)               #有无括号无差别
print 'c =',c